package com.zhsj.OkeHomeConsumption.ui.fragment.minehome;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.widget.FrameLayout;

import com.flyco.tablayout.SlidingTabLayout;
import com.zhsj.OkeHomeConsumption.R;
import com.zhsj.OkeHomeConsumption.common.MyActivity;

import java.util.ArrayList;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * author : Xingdx
 * <p>
 * time   : 2018/10/18
 * desc   : 我的团队
 */
public final class InviteActivity extends MyActivity {

    @BindView(R.id.tablayout)
    SlidingTabLayout tablayout;
    @BindView(R.id.viper)
    ViewPager viper;

    private ArrayList<Fragment> mFragments;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_invite;
    }

    @Override
    protected int getTitleId() {
        return R.id.tb_copy_title;
    }

    @Override
    protected void initView() {
    }

    @Override
    protected void initData() {
        mFragments = new ArrayList<>();
        mFragments.add(new InviteFragment().newInstance(1));
//      无需编写适配器，一行代码关联TabLayout与ViewPager
        tablayout.setViewPager(viper, new String[]{"我的客户"}, this, mFragments);
        tablayout.setVisibility(View.GONE);
/** 关联数据支持同时切换fragments */
//        public void setTabData(ArrayList tabEntitys, FragmentManager fm, int containerViewId, ArrayList fragments)


    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }
}